package tracer;

import surface.ImageProducer;

/**
 * This a thread class to realize the multi-thread
 * 
 * @author Yuting Wu
 * 
 */
public class RayTracerThread implements Runnable {

	private ImageProducer iPro;
	private int start;
	private int end;

	/**
	 * Constructor              
	 * 
	 * @param iPro              
	 * @param start             
	 * @param end               
	 */
	public RayTracerThread(ImageProducer iPro, int start, int end) {

		this.iPro = iPro;
		this.start = start;
		this.end = end;

	}

	/**
	 * invoke the execution method for excution **
	 */
	public void run() {
		iPro.calPixels(start, end);

	}

}
